<!DOCTYPE html>
<html>
<head>
<title>编辑文章分类</title>
#include("../include/common.html")
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>编辑文章分类</h5>
            </div>
           <form id="inputForm" action="update" method="post">
                <input type="hidden" name="id" value="#(articleCategory.id)" />
                <div class="ibox-content">
                    <div class="form-horizontal clearfix">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">名称：</label>
                            <div class="col-sm-3">
                                <input class="form-control" type="text" name="name" value="#(articleCategory.name)">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">上级分类：</label>
                            <div class="col-sm-3">
                               <select class="form-control" name="parentId">
                                    <option value="">根目录</option>
                                    #for(articleCategoryItem : articleCategoryTree)
                                        <option value="#(articleCategoryItem.id)" #if(articleCategoryItem.id == articleCategory.parentId) selected="selected"  #end>
                                            #if(articleCategoryItem.grade != 0)
                                                #for(i = 0; i < articleCategoryItem.grade; i++)
                                                    &nbsp;&nbsp;
                                                #end
                                            #end
                                            #(articleCategoryItem.name)
                                        </option>
                                    #end
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
	                        <label class="col-sm-3 control-label">备注：</label>
	                        <div class="col-sm-3">
                                <textarea class="form-control" style="height: 100px;" name="memo">#(articleCategory.memo)</textarea>
                            </div>
	                    </div>
	                    <div class="form-group">
	                        <label class="col-sm-3 control-label">说明：</label>
	                        <div class="col-sm-3">
                                <textarea class="form-control" style="height: 100px;" name="remark">#(articleCategory.remark)</textarea>
                            </div>
	                    </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">标题：</label>
                            <div class="col-sm-3">
                                <input class="form-control" type="text" name="title" value="#(articleCategory.title)">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">关键词：</label>
                            <div class="col-sm-3">
                                <textarea class="form-control" style="height: 50px;" name="keywords">#(articleCategory.keywords)</textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">描述：</label>
                            <div class="col-sm-3">
                                <textarea class="form-control" style="height: 50px;" name="description">#(articleCategory.description)</textarea>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer col-sm-3 col-sm-offset-2">
                    <button type="submit" class="btn btn-w-m btn-primary">确定</button>
                    <button type="button" class="btn btn-w-m btn-default" onclick="history.back(); return false;">取消</button>
                </div>
            </form>
        </div>
    </div>
</body>
</html>
<script type="text/javascript">
$().ready(function() {

    var $inputForm = $("#inputForm");
    
    // 表单验证
    $inputForm.validate({
        rules: {
            name: "required"
        }
    });

});
</script>